package com.graduation.controller;

import com.graduation.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description
 * @Author YaoQi
 * @Date 2018/3/6 23:57
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    /**
     * 获取所有的user实体
     *
     * @return
     */
    @RequestMapping("getList")
    public Map getUserList() {
        Map<String, Object> map = new HashMap<>();
        map.put("userList", userService.getUserList());
        return map;
    }
}
